import Home from '../pages/Home';
import About from '../pages/About';
import Login from '../pages/Login';

// Layout
import Admin from '../layout/Admin';

// 二级路由
import UserList from '../pages/user/UserList';
import ProductList from '../pages/product/ProductList'


const routes = [{
    from: '/',
    to: '/home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/admin',
    component: Admin,
    auth: false,
    children: [{
        from: '/admin',
        to: '/admin/user'
      },
      {
        path: '/admin/user',
        component: UserList
      },
      {
        path: '/admin/product',
        component: ProductList
      }
    ]
  },
  {
    path: '/about',
    component: About
  },
  {
    path: '/login',
    component: Login

  }

];


export default routes;